package com.service.impl;

import java.io.Serializable;
import java.util.List;

import com.dao.LoginDao;
import com.enetiy.Logins;
import com.enetiy.Users;
import com.service.LoginService;

public class LoginServiceImpl implements LoginService {
	private LoginDao loginDao; 
	
	public Serializable insertUsers(Users u) throws Exception {
		Serializable s = loginDao.insertUsers(u);
		return s;
	}

	public boolean insertLogins(Logins l) throws Exception {
		Serializable s = loginDao.insertLogins(l);
		if(s!=null){
			return true;
		}
		return false;
	}
	  
	public Users selectUserId(int id) throws Exception {
		return loginDao.selectUserId(id);
	}
	
	public void setLoginDao(LoginDao loginDao) {
		this.loginDao = loginDao;
	}
	  
	public void updateUser(Users u) throws Exception {
		loginDao.updateUser(u);
	}

	@Override
	public List<Users> selectUserList(String[] userid) throws Exception {
		return this.loginDao.selectUserList(userid);
	}

	@Override
	public Users selectUser(String soleCode) throws Exception {
		return this.loginDao.selectUser(soleCode);
	}

	@Override
	public Users selectUser(int num) throws Exception {
		return  this.loginDao.selectUser(num);
	}

}
